<?php

namespace App\Models\Article\Category;

use App\Models\Article\ArticleCategoryModel;
use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;
use Illuminate\Database\Eloquent\Relations\HasOne;

class ArticleCategoryOperateHistoryModel extends BaseModel
{

    use KfSoftDeletes;

    protected $table = "article_category_operate_history";

    protected $fillable = [
        "targetId",
        "operateType",
        "status",
        "createdAt",
        "createdByUid",
        "updatedAt",
        "updatedByUid"
    ];

    /**
     * @return HasOne
     */
    public function categoryRel(): HasOne
    {
        return $this->hasOne(ArticleCategoryModel::class, "id", "targetId");
    }
}
